<#include "common/header.html"/>

    <div class="wrapper wrapper-content animated fadeInUp">
        <div class="row">
            <div class="col-sm-12">

                <div class="ibox">
                    <div class="ibox-title">
                        <h5>用户列表</h5>
                        <div class="ibox-tools">
                            <a href="/user/useradd" class="btn btn-primary btn-xs">添加用户</a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row m-b-sm m-t-sm">
                           
                            <div class="col-md-12">
                               <form role="form" action="x" class="form-inline">
                            <div class="form-group">
                                <label for="exampleInputEmail2" >用户名</label>
                                <input type="text" placeholder="请输入用户名" id="exampleInputEmail2" class="form-control" name="userName">
                            </div>
                            <div class="form-group">
                                <label for="exampleInputPassword2" >角色</label>
                                <select class="form-control" name="userRole">
                                	<option value="0">请选择</option>
	                                	<#list roleList as role>
											<option value="${role.id}">${role.roleName}</option>
										</#list>
                                </select>
                            </div>
                            <button class="btn btn-primary" type="submit">搜索</button>
                        </form>
                            </div>
                        </div>

                        <div class="project-list">

                            <table class="table table-hover">
                                <tbody>
                                	<tr>
                                		<th>用户编码</th>
                                		<th>用户名称</th>
                                		<th>性别</th>
                                		<th>出生日期</th>
                                		<th>电话号码</th>
                                		<th>角色</th>
                                		<th width="15%">操作</th>
                                	</tr>
                                    <#list pageInfo.records as user>
                                    <tr>
										<td>${user.userCode}</td>
										<td>${user.userName}</td>
										<td>
											${(user.gender==1)?string("男","女")}
										</td>
										<td>${user.birthday}</td>
										<td>${user.phone}</td>
										<td>${user.roleName}</td>
										<td><input type="hidden" value="${user.id}"/></td>
                                        <td>
                                            <a href="get?id=${user.id}" class="btn btn-white btn-sm"><i class="fa fa-folder"></i> 查看 </a>
                                            <a href="#" class="btn btn-white btn-sm delete" id="del"><i class="fa fa-pencil"></i> 删除 </a>
                                        </td>
                                    </tr>
                                    <#else>
                                    		<tr>
                                    			<td colspan="7">无结果</td>
                                    		</tr>
                                    </#list>
                                    </tbody>
                                </table>
                                <nav aria-label="Page navigation">
								  <ul class="pagination">
								  <#if pageInfo.hasPrevious()>
								  	<li>
								      <a href="list?pageno=1">
								        <span aria-hidden="true">首页</span>
								      </a>
								    </li>
								    <li>
								      <a href="list?pageno=${pageInfo.current - 1}">
								        <span aria-hidden="true">上一页</span>
								      </a>
								    </li>
								    </#if>
								    <#if pageInfo.hasNext()>
								    <li>
								      <a href="list?pageno=${pageInfo.current + 1}">
								        <span aria-hidden="true">下一页</span>
								      </a>
								    </li>
								    <li>
								      <a href="list?pageno=${pageInfo.pages}">
								        <span aria-hidden="true">末页</span>
								      </a>
								    </li>
								    </#if>
								    <li>
								    	<a>${pageInfo.current}/${pageInfo.pages}</a>
								    </li>
								  </ul>
								</nav>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
		
	
	<#include "common/footer.html"/>
